package com.dacong.nezha.utils;

import cn.hutool.json.JSONUtil;

import java.util.Map;

public class Shensu {


    public static void main(String[] args) {


    }

    /**
     * 超时发货列表
     * @return
     */
    public static String mallOrderList(String token){
        String url = "/mallOrder/list";
        String method = "POST";
        String param = "{\"page\":0,\"size\":50,\"status\":\"3\"}";
        Map<String, Object> body = Request.createBody(url, method, param,token);
        return ExcuteHttp.executeHttp(JSONUtil.toJsonStr(body));
    }

    /**
     * 申诉完成
     * @return
     */
    public static String mallOrderList2(String token){
        String url = "/mallOrder/list";
        String method = "POST";
        String param = "{\"page\":0,\"size\":50,\"status\":\"5\"}";
        Map<String, Object> body = Request.createBody(url, method, param, token);
        return ExcuteHttp.executeHttp(JSONUtil.toJsonStr(body));
    }

    /**
     * 申诉
     * @param orderNo
     * @return
     */
    public static String mallOrderApplyComplaint(String orderNo,String token){
        String url = "/mallOrder/applyComplaint";
        String method = "POST";
        String param = "{\"orderNo\":\""+orderNo+"\",\"reason\":\"缺货\"}";
        Map<String, Object> body = Request.createBody(url, method, param,token);
        return ExcuteHttp.executeHttp(JSONUtil.toJsonStr(body));
    }

    /**
     * 退款
     * @param orderNo
     * @return
     */
    public static String mallOrderapplyRefund(String orderNo,String token){
        String url = "/mallOrder/applyRefund";
        String method = "POST";
        String param = "{\"orderNo\":\""+orderNo+"\"}";
        Map<String, Object> body = Request.createBody(url, method, param, token);
        return ExcuteHttp.executeHttp(JSONUtil.toJsonStr(body));
    }
}
